<template>
    <div class="page">
        <div class="page_header" style="display: flex;">
            <div style="flex: 1 1 auto">
                <el-form ref="searchForm" :model="searchForm" style="display: flex;">
                    <el-form-item prop="status" style="margin-right: 10px;">
                        <el-radio-group v-model="searchForm.is_delete" @change="$store.dispatch('tableReload')">
                            <el-radio-button :label="0">待处理</el-radio-button>
                            <el-radio-button :label="1">已关闭</el-radio-button>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item prop="work_no">
                        <el-input v-model="searchForm.work_no" placeholder="工单编号"></el-input>
                    </el-form-item>
                    <el-form-item prop="shop_name">
                        <el-input v-model="searchForm.shop_name" placeholder="商户名称"></el-input>
                    </el-form-item>
                    <el-form-item prop="talent_name">
                        <el-input v-model="searchForm.talent_name" placeholder="达人昵称"></el-input>
                    </el-form-item>

                </el-form>
            </div>
            <div style="flex:0 0 auto;">
                <el-button @click="$store.dispatch('tableReload')" type="primary">查询</el-button>
                <el-button @click="$store.dispatch('tableReset')">重置</el-button>
            </div>
        </div>
        <el-card class="page_body">
            <el-table
                height="10"
                class="page_body_table"
                :data="common.tableData"
                v-loading="common.loading"
                border
                stripe
                style="width: 100%">
                <el-table-column prop="hang_id" label="申诉id"></el-table-column>
                <el-table-column prop="status" label="状态"></el-table-column>
                <el-table-column prop="work_no" width="132" label="工单号">
                    <template slot-scope="scope">
                        <el-button type="text" @click="$refs.workDetail.init(scope.row.work_id)">{{scope.row.work_no}}</el-button>
                    </template>
                </el-table-column>
                <el-table-column prop="shop_name" label="商户名称"></el-table-column>
                <el-table-column prop="account_name" label="达人昵称"></el-table-column>
                <el-table-column prop="refused_at" label="拒回时间"></el-table-column>
                <el-table-column prop="created_at" label="申诉时间"></el-table-column>
                <el-table-column prop="feedback_at" label="审核时间"></el-table-column>
                <el-table-column prop="feedback_name" label="审核结果"></el-table-column>

<!--                <el-table-column prop="status_name" width="100" label="工单状态"></el-table-column>-->
<!--                <el-table-column prop="channel_name" width="100" label="达人等级"></el-table-column>-->
<!--                <el-table-column prop="contact_phone" label="商户电话"></el-table-column>-->
<!--                <el-table-column prop="talent_name" label="达人昵称"></el-table-column>-->
<!--                <el-table-column prop="created_at" width="150" label="接单时间"></el-table-column>-->
<!--                <el-table-column prop="submit_time" width="150" label="投稿时间"></el-table-column>-->
<!--                <el-table-column prop="short_name" width="160" label="商户区域"></el-table-column>-->
<!--                <el-table-column prop="address" label="商户地址"></el-table-column>-->
            </el-table>
            <pagination class="page_body_pagination"></pagination>
        </el-card>
        <work-detail-dialog ref="workDetail" @refresh="$store.dispatch('tableReload')"></work-detail-dialog>
    </div>
</template>

<script>
    import {mapState} from 'vuex';
    import Pagination from "../Pagination";
    import WorkDetailDialog from "./Dialog/WorkDetailDialog";
    export default {
        name: "HangUp",
        computed:{
            ...mapState(['common','laifei']),
        },
        components:{
            Pagination,
            WorkDetailDialog,
        },
        data(){
            return{
                method:'post',
                url:'/api/laifei/work/hangup',
                searchForm:{
                    is_delete:'',
                    work_no:'',
                    shop_name:'',
                    talent_name:'',
                },

            }
        },
        created() {
            this.$store.dispatch('pageInit', this);
        },
    }
</script>

<style scoped>

</style>
